<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/vue.js"></script>
    <script src="../js/vue-router.js"></script>
</head>
<body>
    <div id="app">
        <router-link to="/del/2">删除</router-link>
        <router-view></router-view>
    </div>
</body>
<script>
    var mytmp = {
        template:"<h2>删除{{$route.params.id}}内容</h2>"
    };

    var rou = new VueRouter({
        routes:[
            {path:"/del/:id",component:mytmp}
        ]
    });

    var app = new Vue({
        el:"#app",
        router:rou
    });
</script>
</html>

